Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 621
Zeile 87... Zeile 87...
87
     * @param  array<int, Element>  $elements
87
     * @param  array<int, Element>  $elements
88
     * @return array<int, Element|string>
88
     * @return array<int, Element|string>
89
     */
89
     */
90
    private function applyJustifyBetween(array $elements): array
90
    private function applyJustifyBetween(array $elements): array
91
    {
91
    {
-
 
92
        if (count($elements) <= 1) {
-
 
93
            return $elements;
-
 
94
        }
-
 
95
 
92
        [$totalWidth, $parentWidth] = $this->getWidthFromElements($elements);
96
        [$totalWidth, $parentWidth] = $this->getWidthFromElements($elements);
93
        $space = ($parentWidth - $totalWidth) / (count($elements) - 1);
97
        $space = ($parentWidth - $totalWidth) / (count($elements) - 1);
Zeile 94... Zeile 98...
94
 
98
 
95
        if ($space < 1) {
99
        if ($space < 1) {
Zeile 144... Zeile 148...
144
     * @param  array<int, Element>  $elements
148
     * @param  array<int, Element>  $elements
145
     * @return array<int, Element|string>
149
     * @return array<int, Element|string>
146
     */
150
     */
147
    private function applyJustifyAround(array $elements): array
151
    private function applyJustifyAround(array $elements): array
148
    {
152
    {
-
 
153
        if (count($elements) === 0) {
-
 
154
            return $elements;
-
 
155
        }
-
 
156
 
149
        [$totalWidth, $parentWidth] = $this->getWidthFromElements($elements);
157
        [$totalWidth, $parentWidth] = $this->getWidthFromElements($elements);
150
        $space = ($parentWidth - $totalWidth) / count($elements);
158
        $space = ($parentWidth - $totalWidth) / count($elements);
Zeile 151... Zeile 159...
151
 
159
 
152
        if ($space < 1) {
160
        if ($space < 1) {