private function convertHashToArrayOfBoolean()
    {
        preg_match_all('/(\w)(\w)/', $this->hash, $chars);

        foreach ($chars[1] as $i => $char) {
            $index = (int) ($i / 3);
            $data = $this->convertHexaToBoolean($char);

            $items = [
                0 => [0, 4],
                1 => [1, 3],
                2 => [2],
            ];

            foreach ($items[$i % 3] as $item) {
                $this->arrayOfSquare[$index][$item] = $data;
            }

            ksort($this->arrayOfSquare[$index]);
        }

        $this->color = array_map(function ($data) {
            return hexdec($data) * 16;
        }, array_reverse($chars[1]));

        return $this;
    }
private function convertHashToArrayOfBoolean()
    {
        preg_match_all('/(\w)(\w)/', $this->hash, $chars);

        foreach ($chars[1] as $i => $char) {
            $index = (int) ($i / 3);
            $data = $this->convertHexaToBoolean($char);

            $items = [
                0 => [0, 4],
                1 => [1, 3],
                2 => [2],
            ];

            foreach ($items[$i % 3] as $item) {
                $this->arrayOfSquare[$index][$item] = $data;
            }

            ksort($this->arrayOfSquare[$index]);
        }

        $this->color = array_map(function ($data) {
            return hexdec($data) * 16;
        }, array_reverse($chars[1]));

        return $this;
    }
private function convertHashToArrayOfBoolean ( ) { preg_match_all ( '/(\w)(\w)/' , $ this -> hash , $ chars ) ; foreach ( $ chars [ 1 ] as $ i => $ char ) { $ index = ( int ) ( $ i / 3 ) ; $ data = $ this -> convertHexaToBoolean ( $ char ) ; $ items = [ 0 => [ 0 , 4 ] , 1 => [ 1 , 3 ] , 2 => [ 2 ] , ] ; foreach ( $ items [ $ i % 3 ] as $ item ) { $ this -> arrayOfSquare [ $ index ] [ $ item ] = $ data ; } ksort ( $ this -> arrayOfSquare [ $ index ] ) ; } $ this -> color = array_map ( function ( $ data ) { return hexdec ( $ data ) * 16 ; } , array_reverse ( $ chars [ 1 ] ) ) ; return $ this ; }
Convert the hash into an multidimensional array of boolean.

@return $this
Convert the hash into an multidimensional array of boolean .